<%-- 
    Document   : content_bidding
    Created on : Dec 31, 2011, 5:37:28 PM
    Author     : Ngoc Linh
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<div id="content-col">
    <h2 class="bid_header_title">Phiên đấu giá tham gia đang diễn ra</h2>
    <div id="mem_bidding">
        <div class="option_view">
            <div class="search_pro fl">
                <form action="#" method="get">
                    <label for="search_name">Từ khóa</label>
                    <input id="search_name" name="search_name" type="text" />
                    <input type="submit" value="Tìm" />
                </form>
            </div>
            <div class="mem_paging fr">
                <ul class="fl">
                    <c:if test="${soTrang > 0}" >
                        <c:forEach begin="1" end="${soTrang}" var="i">
                            <c:url value="bidding.do" var="bidding_link">
                                <c:param name="page" value="${i}" />
                            </c:url>
                            <li><a href="${bidding_link}" <c:if test="${page eq i}">class="selected"</c:if> >${i}</a></li>
                        </c:forEach>
                    </c:if>
                </ul>
            </div>
        </div>
        <table class="table_mem" style="width: 674px;">
            <thead>
                <tr>
                    <td class="header_Time">
                        Thời gian
                    </td>
                    <td class="header_Product">
                        Sản Phẩm
                    </td>                                    
                    <td class="header_PriceHT">
                        Giá hiện tại
                    </td>
                    <td class="header_Deadline">
                        Kết thúc
                    </td>                                    
                </tr>
            </thead>
            <tbody>
                <c:if test="${not empty requestScope.dsSanPham}">
                    <c:forEach var="sp" items="${requestScope.dsSanPham}">
                        <tr>
                            <td class="header_Time">
                                <fmt:formatDate pattern="dd/MM/yyyy HH:mm:SS" value="${sp.ngayDang}" />
                            </td>
                            <td class="header_Product">
                                <a target="_blank" title="Xem chi tiết sản phẩm" href="/DauGia/product.do?masp=${sp.maSanPham}">
                                    ${sp.tenSanPham}
                                </a>
                            </td>
                            <td class="header_PriceHT">
                                <fmt:formatNumber pattern="###,###" value="${sp.giaHienTai}" /> đ
                            </td>
                            <td class="header_Deadline">
                                <fmt:formatDate pattern="dd/MM/yyyy HH:mm:SS" value="${sp.ngayHetHan}" />
                            </td>                                    
                        </tr>
                    </c:forEach>
                </c:if>
            </tbody>
        </table
    </div>
</div>
